In [1]:
REF1_HASH_DEFAULT = 'b4ebd7576eab41248b4e0de0b92af558b144f5f6'
REF2_HASH_DEFAULT = '3ea1a395e6bacebaeacc165be5f51a236fb1674d'
In [2]:
import os
import pathlib
import shutil
import subprocess
import tempfile
from filecmp import dircmp
from pathlib import Path

import numpy as np
import pandas as pd
import plotly.graph_objects as go
from plotly.offline import init_notebook_mode
init_notebook_mode()
In [3]:
try:
    REF1_HASH = os.environ['REF1_HASH']

    if not REF1_HASH:
        raise ValueError

except (KeyError, ValueError):
    REF1_HASH = REF1_HASH_DEFAULT

try:
    REF2_HASH = os.environ['REF2_HASH']

    if not REF2_HASH:
        raise ValueError

except (KeyError, ValueError):
    REF2_HASH = REF2_HASH_DEFAULT
In [4]:
def highlight_missing(val):
    if val == True:
        return 'background-color: #BCF5A9'
    else:
        return 'background-color: #F5A9A9'
    
def highlight_relative_difference(val):
    ret = 'background-color: #BCF5A9'
    if val is None:
        ret = 'background-color: #BCF5A9'
    elif val > 1e-2:
        ret = 'background-color: #F2F5A9'
    elif val > 1e-1:
        ret = 'background-color: #F5D0A9'
    elif val > 1:
        ret = 'background-color: #F5A9A9'
    return ret
In [5]:
REF1_HASH, REF2_HASH
Out[5]:
('b4ebd7576eab41248b4e0de0b92af558b144f5f6',
 '3ea1a395e6bacebaeacc165be5f51a236fb1674d')
In [6]:
class ReferenceComparer(object):
    def __init__(self, ref1_hash=None, ref2_hash=None):
        assert not ((ref1_hash is None) and (ref2_hash is None)), "One hash can not be None"
        self.test_table_dict = {}
        self.ref1_hash = ref1_hash
        self.ref2_hash = ref2_hash
        self.compare_path = "tardis"
        self.tmp_dir = None
        self.setup()
        self.tmp_dir = Path(self.tmp_dir)
        self.ref1_path = self.tmp_dir / f"ref1_{self.compare_path}"
        self.ref2_path = self.tmp_dir / f"ref2_{self.compare_path}"
        self.dcmp = dircmp(self.ref1_path, self.ref2_path)
        self.print_diff_files(self.dcmp)
    
    def setup(self):
        self.tmp_dir = tempfile.mkdtemp()
        print('Created temporary directory at {0}. Delete after use with .teardown'.format(self.tmp_dir))
        
        for ref_id, ref_hash in enumerate([self.ref1_hash, self.ref2_hash]):
            ref_id += 1
            if ref_hash is not None:
                self._copy_data_from_hash(ref_hash, 'ref{0}_'.format(ref_id))
            else:
                subprocess.Popen('cp {0} {1}'.format(self.compare_path, 
                                                     os.path.join(self.tmp_dir, 
                                                                  'ref{0}_{1}'.format(ref_id, self.compare_path))), 
                                                     shell=True)
            setattr(self, 'ref{0}_fname'.format(ref_id), 
                    os.path.join(self.tmp_dir, 'ref{0}_{1}'.format(ref_id, self.compare_path)))

    def teardown(self):
        shutil.rmtree(self.tmp_dir)

    def _copy_data_from_hash(self, ref_hash, prefix):
        git_cmd = ['git']
        git_cmd.append('--work-tree={0}'.format(self.tmp_dir))
        git_cmd += ['checkout', ref_hash, self.compare_path]
        p = subprocess.Popen(git_cmd)
        p.wait()
        shutil.move(os.path.join(self.tmp_dir, self.compare_path), 
                    os.path.join(self.tmp_dir, prefix + self.compare_path))

    def print_diff_files(self, dcmp):
        if isinstance(dcmp.right, pathlib.Path):
            dcmp.right = str(dcmp.right)
        if isinstance(dcmp.left, pathlib.Path):
            dcmp.left = str(dcmp.left)
            
        for item in dcmp.right_only:
            if Path(dcmp.right + "/" + item).is_file:
                print(f"new file detected at: {dcmp.right + '/' +item}")
                print(f"New file detected inside ref1: {item}")
                print(f"Path: {dcmp.right + '/' +item}")
                print()
        for item in dcmp.left_only:
            if Path(dcmp.left + "/" + item).is_file:
                print(f"New file detected inside ref2: {item}")
                print(f"Path: {dcmp.left + '/' +item}")
                print()
    
        for name in dcmp.diff_files:
            print(f"Modified file found {name}")
            left = dcmp.left.removeprefix(str(self.tmp_dir) + "/" + "ref1_tardis/")
            right = dcmp.right.removeprefix(str(self.tmp_dir) + "/" + "ref2_tardis/")
            if left==right:
                print(f"Path: {left}")
            if name.endswith(".h5"):
                self.test_table_dict[name] = {
                    "path": left
                }
                self.summarise_changes_hdf(name, str(dcmp.left), str(dcmp.right))
            print()
        for sub_dcmp in dcmp.subdirs.values():
            self.print_diff_files(sub_dcmp)
            
    def summarise_changes_hdf(self, name, path1, path2):
        ref1 = pd.HDFStore(path1 + "/"+ name)
        ref2 = pd.HDFStore(path2 + "/"+ name)
        k1 = set(ref1.keys())
        k2 = set(ref2.keys())
        print(f"Total number of keys- in ref1: {len(k1)}, in ref2: {len(k2)}")
        different_keys = len(k1^k2)
        print(f"Number of keys with different names in ref1 and ref2: {different_keys}")

        identical_items = []
        identical_name_different_data = []
        identical_name_different_data_dfs = {}
        for item in k1&k2:
            try:
                if ref2[item].equals(ref1[item]):
                    identical_items.append(item)
                else:
                    abs_diff = np.fabs(ref1[item] - ref2[item])
                    rel_diff = (abs_diff / np.fabs(ref1[item]))[ref1[item] != 0]
                    print(f"Displaying heatmap for key {item} in file {name}")
                    for diff_type, diff in zip(["abs", "rel"], [abs_diff, rel_diff]):
                        if "abs" in diff_type:
                            print("Visualising Absolute Differences")
                        else:
                            print("Visualising Relative Differences")
                        if isinstance(diff, pd.Series):
                            diff = pd.DataFrame([diff.mean(), diff.max()], index=['mean', 'max'])
                            display(diff)
                        else:
                            with pd.option_context('display.max_rows', 100, 'display.max_columns', 10):
                                if isinstance(diff.index, pd.core.indexes.multi.MultiIndex):
                                    diff = diff.reset_index(drop=True)
                                    diff = pd.DataFrame([diff.mean(), diff.max()], index=['mean', 'max'])
                                    display(diff.style.format('{:.2g}'.format).background_gradient(cmap='Reds'))
                                    
                                else:
                                    diff = pd.DataFrame([diff.mean(), diff.max()], index=['mean', 'max'])
                                    display(diff.style.format('{:.2g}'.format).background_gradient(cmap='Reds'))

                    identical_name_different_data.append(item)
                    identical_name_different_data_dfs[item] = rel_diff
                    print("\n")

            except Exception as e:
                print("Facing error comparing item: ", item)
                print(e)
                
        print(f"Number of keys with same name but different data in ref1 and ref2: {len(identical_name_different_data)}")
        print(f"Number of totally same keys: {len(identical_items)}")
        print()
        self.test_table_dict[name].update({
            "different_keys": different_keys,
            "identical_keys": len(identical_items),
            "identical_keys_diff_data": len(identical_name_different_data),
            "identical_name_different_data_dfs": identical_name_different_data_dfs
            
        })
        
In [7]:
rc = ReferenceComparer(REF1_HASH, REF2_HASH)
rc.teardown()
Created temporary directory at /var/folders/5r/hzj1v37d7nl3gpyk2kt94qb40000gn/T/tmp6_6nzfot. Delete after use with .teardown
Updated 81 paths from fc89854
Updated 81 paths from c8ec28c
Modified file found test_montecarlo_main_loop.h5
Path: montecarlo/montecarlo_numba/tests/test_base
Total number of keys- in ref1: 77, in ref2: 83
Number of keys with different names in ref1 and ref2: 62
Displaying heatmap for key /simulation/plasma/ion_number_density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.7e-09 0 2.4e-09 1.6e-09 1.1e-09 1.1e-09 6.9e-10 1e-09 5.1e-10 3.4e-10 0 3.1e-10 9.6e-11 2.4e-10 3.1e-10 4.6e-11 0 8.2e-11 6.5e-11 2e-11
max 1.2e-07 0 1.2e-07 6e-08 6e-08 3e-08 3e-08 4.5e-08 1.5e-08 1.5e-08 0 1.5e-08 7.5e-09 1.5e-08 1.5e-08 3.7e-09 0 3.7e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4e-16 0 2.4e-16 2.6e-16 2.2e-16 4.1e-16 2.6e-16 2.8e-16 1.9e-16 2.4e-16 0 3.8e-16 4.2e-16 5.1e-16 5.5e-16 7.6e-17 0 5e-16 2.2e-16 5.6e-17
max 9.5e-16 0 5.8e-16 5.2e-16 3.5e-16 9.5e-16 6.1e-16 6.6e-16 4.1e-16 4.5e-16 0 1.1e-15 9.8e-16 1.2e-15 1.3e-15 4e-16 0 1e-15 4.8e-16 3e-16

Displaying heatmap for key /simulation/plasma/stimulated_emission_factor in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 2.9e-17 0 3.1e-17 3.3e-17 3e-17 3e-17 3.1e-17 2.9e-17 2.2e-17 3e-17 0 3.1e-17 3.2e-17 3.1e-17 2.9e-17 1.5e-17 0 3.1e-17 2.9e-17 1.2e-17
max 4.4e-16 0 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 0 4.4e-16 4.4e-16 4.4e-16 4.4e-16 3.3e-16 0 4.4e-16 4.4e-16 4.4e-16
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.7e-16 0 1.8e-16 1.9e-16 1.7e-16 1.7e-16 1.8e-16 1.6e-16 7.5e-17 1.7e-16 0 1.7e-16 1.8e-16 1.7e-16 1.7e-16 5.2e-17 0 1.8e-16 1.5e-16 4.1e-17
max 3.1e-14 0 3e-14 2e-14 1.9e-14 1.6e-14 3.1e-14 2.5e-14 4.2e-15 2.3e-14 0 1.6e-14 2.2e-14 2e-14 3e-14 2.3e-15 0 2.2e-14 1.8e-14 2.8e-15

Displaying heatmap for key /simulation/plasma/transition_probabilities in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4.2e-18 0 2.4e-18 3.6e-18 1.6e-18 2.6e-18 1.9e-18 4.7e-18 3.2e-18 1.6e-18 0 1.5e-18 1.1e-18 1.8e-18 2e-18 3.4e-19 0 6.5e-18 2e-18 2.5e-19
max 1.8e-14 0 9.5e-15 3.6e-14 2.1e-15 8.7e-15 8.1e-15 8.2e-14 5.1e-14 3.8e-15 0 5.1e-15 1e-15 1.6e-14 5.7e-15 1.5e-15 0 1.8e-13 2.1e-14 6.7e-16
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.9e-16 0 1.4e-16 1.8e-16 1e-16 1.4e-16 1.1e-16 1.4e-16 1.4e-16 9.9e-17 0 1.1e-16 9.8e-17 1.5e-16 1.2e-16 3.8e-17 0 2.4e-16 8.9e-17 2.1e-17
max 2.5e-13 0 2.4e-13 2e-13 1.3e-13 1.4e-13 6.3e-14 3.3e-13 2.7e-13 8.6e-14 0 9.6e-14 2.2e-14 7.1e-14 8.3e-14 1.4e-14 0 9.3e-13 1.5e-13 9.4e-15

Displaying heatmap for key /simulation/simulation_state/density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/electron_densities in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
0
mean 1.061708e-07
max 9.536743e-07
Visualising Relative Differences
0
mean 1.593295e-16
max 4.618070e-16

Displaying heatmap for key /simulation/plasma/level_number_density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4e-11 0 5.2e-11 2.9e-11 2.4e-11 2.2e-11 1.4e-11 2.2e-11 1.1e-11 7.5e-12 0 6.7e-12 2e-12 5.2e-12 6.7e-12 9.6e-13 0 1.7e-12 1.3e-12 4.3e-13
max 1.2e-07 0 1.2e-07 6e-08 6e-08 3e-08 3e-08 4.5e-08 1.5e-08 1.5e-08 0 1.5e-08 7.5e-09 1.5e-08 1.5e-08 3.7e-09 0 3.7e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4.8e-16 0 3.2e-16 3.3e-16 2e-16 4.4e-16 2.9e-16 3.3e-16 1.9e-16 2.5e-16 0 5.1e-16 5.2e-16 6.2e-16 6.6e-16 8.4e-17 0 6.4e-16 2.7e-16 5.6e-17
max 1.1e-15 0 7.6e-16 6.7e-16 5e-16 1.1e-15 7.5e-16 8.3e-16 5.4e-16 6.6e-16 0 1.3e-15 1.1e-15 1.3e-15 1.5e-15 5.6e-16 0 1.2e-15 6.6e-16 4.1e-16

Displaying heatmap for key /simulation/iterations_electron_densities in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 9.5e-07 0 2.4e-07 2.4e-07 0 2.4e-07 1.2e-07 6e-08 0 0 0 6e-08 6e-08 6e-08 6e-08 0 0 3e-08 7.5e-09 0
max 9.5e-07 0 2.4e-07 2.4e-07 0 2.4e-07 1.2e-07 6e-08 0 0 0 6e-08 6e-08 6e-08 6e-08 0 0 3e-08 7.5e-09 0
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 3.3e-16 0 1.4e-16 1.8e-16 0 3e-16 1.9e-16 1.2e-16 0 0 0 2.6e-16 3.2e-16 3.9e-16 4.6e-16 0 0 3.9e-16 1.1e-16 0
max 3.3e-16 0 1.4e-16 1.8e-16 0 3e-16 1.9e-16 1.2e-16 0 0 0 2.6e-16 3.2e-16 3.9e-16 4.6e-16 0 0 3.9e-16 1.1e-16 0

Displaying heatmap for key /simulation/plasma/beta_sobolev in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 6.6e-17 0 3.6e-17 4e-17 2.3e-17 3.5e-17 1.9e-17 3.3e-17 3e-17 1.5e-17 0 1.6e-17 1.1e-17 1.9e-17 2.2e-17 2.3e-18 0 4.2e-17 1.3e-17 1.6e-18
max 2.5e-13 0 2.3e-13 2.1e-13 1.3e-13 1.4e-13 6.3e-14 3.4e-13 2.7e-13 8.7e-14 0 9.6e-14 1.9e-14 9e-14 8.2e-14 1.4e-14 0 9.3e-13 1.5e-13 9.3e-15
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 7.3e-17 0 4.2e-17 4.6e-17 3e-17 4.2e-17 2.4e-17 4.3e-17 3.6e-17 2e-17 0 2.2e-17 1.4e-17 2.4e-17 3e-17 4.2e-18 0 4.8e-17 1.5e-17 2.5e-18
max 2.5e-13 0 2.3e-13 2.1e-13 1.3e-13 1.4e-13 6.3e-14 3.4e-13 2.7e-13 8.7e-14 0 9.6e-14 1.9e-14 9.1e-14 8.2e-14 1.4e-14 0 9.3e-13 1.5e-13 9.4e-15

Displaying heatmap for key /simulation/plasma/density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/tau_sobolevs in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.9e-12 0 3.4e-12 1.9e-12 1.1e-12 8.6e-13 8.8e-13 1.2e-12 4.3e-13 4.8e-13 0 4.5e-13 2.8e-13 4.8e-13 5.2e-13 1.6e-14 0 1.1e-13 1.6e-13 6.6e-14
max 7.5e-09 0 6e-08 3e-08 3.7e-09 2.8e-09 1.5e-08 1.5e-08 1.4e-09 7.5e-09 0 7.5e-09 7.5e-09 1.1e-08 1.1e-08 5.8e-11 0 1.9e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 5e-16 0 4.1e-16 4.5e-16 3.3e-16 5e-16 3.9e-16 3.9e-16 2.3e-16 3.7e-16 0 6e-16 5.7e-16 6.3e-16 6.7e-16 1.5e-16 0 6.9e-16 3.5e-16 8.6e-17
max 3e-14 0 3.1e-14 2e-14 1.9e-14 1.7e-14 3e-14 2.5e-14 4e-15 2.3e-14 0 1.6e-14 2.3e-14 2.1e-14 3.1e-14 2.4e-15 0 2.4e-14 1.8e-14 3e-15

Displaying heatmap for key /simulation/plasma/number_density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 5.2e-08 0 2.7e-08 2.7e-08 2.6e-08 1.3e-08 1.3e-08 1.4e-08 6.8e-09 5e-09 0 5e-09 1.5e-09 2.4e-09 4.5e-09 7.4e-10 0 1.8e-09 1.1e-09 3.3e-10
max 1.2e-07 0 6e-08 6e-08 6e-08 3e-08 3e-08 3e-08 1.5e-08 1.5e-08 0 1.5e-08 7.5e-09 7.5e-09 1.5e-08 3.7e-09 0 7.5e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.6e-16 0 1.8e-16 2.1e-16 2.1e-16 1.6e-16 2.1e-16 2.8e-16 1.7e-16 1.8e-16 0 2.7e-16 1.1e-16 1.7e-16 2.5e-16 8.5e-17 0 2.1e-16 1.4e-16 4.2e-17
max 2.2e-16 0 2.8e-16 2.9e-16 3.1e-16 2e-16 2.5e-16 3.5e-16 2.9e-16 2.9e-16 0 4.3e-16 2.1e-16 3.1e-16 4e-16 2.8e-16 0 3.9e-16 2e-16 1.3e-16

Number of keys with same name but different data in ref1 and ref2: 11
Number of totally same keys: 38


Modified file found test_montecarlo_main_loop_vpacket_log.h5
Path: montecarlo/montecarlo_numba/tests/test_base
Total number of keys- in ref1: 86, in ref2: 92
Number of keys with different names in ref1 and ref2: 80
Displaying heatmap for key /simulation/plasma/ion_number_density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.7e-09 0 2.4e-09 1.6e-09 1.1e-09 1.1e-09 6.9e-10 1e-09 5.1e-10 3.4e-10 0 3.1e-10 9.6e-11 2.4e-10 3.1e-10 4.6e-11 0 8.2e-11 6.5e-11 2e-11
max 1.2e-07 0 1.2e-07 6e-08 6e-08 3e-08 3e-08 4.5e-08 1.5e-08 1.5e-08 0 1.5e-08 7.5e-09 1.5e-08 1.5e-08 3.7e-09 0 3.7e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4e-16 0 2.4e-16 2.6e-16 2.2e-16 4.1e-16 2.6e-16 2.8e-16 1.9e-16 2.4e-16 0 3.8e-16 4.2e-16 5.1e-16 5.5e-16 7.6e-17 0 5e-16 2.2e-16 5.6e-17
max 9.5e-16 0 5.8e-16 5.2e-16 3.5e-16 9.5e-16 6.1e-16 6.6e-16 4.1e-16 4.5e-16 0 1.1e-15 9.8e-16 1.2e-15 1.3e-15 4e-16 0 1e-15 4.8e-16 3e-16

Displaying heatmap for key /simulation/plasma/stimulated_emission_factor in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 2.9e-17 0 3.1e-17 3.3e-17 3e-17 3e-17 3.1e-17 2.9e-17 2.2e-17 3e-17 0 3.1e-17 3.2e-17 3.1e-17 2.9e-17 1.5e-17 0 3.1e-17 2.9e-17 1.2e-17
max 4.4e-16 0 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16 0 4.4e-16 4.4e-16 4.4e-16 4.4e-16 3.3e-16 0 4.4e-16 4.4e-16 4.4e-16
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.7e-16 0 1.8e-16 1.9e-16 1.7e-16 1.7e-16 1.8e-16 1.6e-16 7.5e-17 1.7e-16 0 1.7e-16 1.8e-16 1.7e-16 1.7e-16 5.2e-17 0 1.8e-16 1.5e-16 4.1e-17
max 3.1e-14 0 3e-14 2e-14 1.9e-14 1.6e-14 3.1e-14 2.5e-14 4.2e-15 2.3e-14 0 1.6e-14 2.2e-14 2e-14 3e-14 2.3e-15 0 2.2e-14 1.8e-14 2.8e-15

Displaying heatmap for key /simulation/plasma/transition_probabilities in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4.2e-18 0 2.4e-18 3.6e-18 1.6e-18 2.6e-18 1.9e-18 4.7e-18 3.2e-18 1.6e-18 0 1.5e-18 1.1e-18 1.8e-18 2e-18 3.4e-19 0 6.5e-18 2e-18 2.5e-19
max 1.8e-14 0 9.5e-15 3.6e-14 2.1e-15 8.7e-15 8.1e-15 8.2e-14 5.1e-14 3.8e-15 0 5.1e-15 1e-15 1.6e-14 5.7e-15 1.5e-15 0 1.8e-13 2.1e-14 6.7e-16
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.9e-16 0 1.4e-16 1.8e-16 1e-16 1.4e-16 1.1e-16 1.4e-16 1.4e-16 9.9e-17 0 1.1e-16 9.8e-17 1.5e-16 1.2e-16 3.8e-17 0 2.4e-16 8.9e-17 2.1e-17
max 2.5e-13 0 2.4e-13 2e-13 1.3e-13 1.4e-13 6.3e-14 3.3e-13 2.7e-13 8.6e-14 0 9.6e-14 2.2e-14 7.1e-14 8.3e-14 1.4e-14 0 9.3e-13 1.5e-13 9.4e-15

Displaying heatmap for key /simulation/simulation_state/density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/electron_densities in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
0
mean 1.061708e-07
max 9.536743e-07
Visualising Relative Differences
0
mean 1.593295e-16
max 4.618070e-16

Displaying heatmap for key /simulation/plasma/level_number_density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4e-11 0 5.2e-11 2.9e-11 2.4e-11 2.2e-11 1.4e-11 2.2e-11 1.1e-11 7.5e-12 0 6.7e-12 2e-12 5.2e-12 6.7e-12 9.6e-13 0 1.7e-12 1.3e-12 4.3e-13
max 1.2e-07 0 1.2e-07 6e-08 6e-08 3e-08 3e-08 4.5e-08 1.5e-08 1.5e-08 0 1.5e-08 7.5e-09 1.5e-08 1.5e-08 3.7e-09 0 3.7e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 4.8e-16 0 3.2e-16 3.3e-16 2e-16 4.4e-16 2.9e-16 3.3e-16 1.9e-16 2.5e-16 0 5.1e-16 5.2e-16 6.2e-16 6.6e-16 8.4e-17 0 6.4e-16 2.7e-16 5.6e-17
max 1.1e-15 0 7.6e-16 6.7e-16 5e-16 1.1e-15 7.5e-16 8.3e-16 5.4e-16 6.6e-16 0 1.3e-15 1.1e-15 1.3e-15 1.5e-15 5.6e-16 0 1.2e-15 6.6e-16 4.1e-16

Displaying heatmap for key /simulation/iterations_electron_densities in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 9.5e-07 0 2.4e-07 2.4e-07 0 2.4e-07 1.2e-07 6e-08 0 0 0 6e-08 6e-08 6e-08 6e-08 0 0 3e-08 7.5e-09 0
max 9.5e-07 0 2.4e-07 2.4e-07 0 2.4e-07 1.2e-07 6e-08 0 0 0 6e-08 6e-08 6e-08 6e-08 0 0 3e-08 7.5e-09 0
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 3.3e-16 0 1.4e-16 1.8e-16 0 3e-16 1.9e-16 1.2e-16 0 0 0 2.6e-16 3.2e-16 3.9e-16 4.6e-16 0 0 3.9e-16 1.1e-16 0
max 3.3e-16 0 1.4e-16 1.8e-16 0 3e-16 1.9e-16 1.2e-16 0 0 0 2.6e-16 3.2e-16 3.9e-16 4.6e-16 0 0 3.9e-16 1.1e-16 0

Displaying heatmap for key /simulation/plasma/beta_sobolev in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 6.6e-17 0 3.6e-17 4e-17 2.3e-17 3.5e-17 1.9e-17 3.3e-17 3e-17 1.5e-17 0 1.6e-17 1.1e-17 1.9e-17 2.2e-17 2.3e-18 0 4.2e-17 1.3e-17 1.6e-18
max 2.5e-13 0 2.3e-13 2.1e-13 1.3e-13 1.4e-13 6.3e-14 3.4e-13 2.7e-13 8.7e-14 0 9.6e-14 1.9e-14 9e-14 8.2e-14 1.4e-14 0 9.3e-13 1.5e-13 9.3e-15
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 7.3e-17 0 4.2e-17 4.6e-17 3e-17 4.2e-17 2.4e-17 4.3e-17 3.6e-17 2e-17 0 2.2e-17 1.4e-17 2.4e-17 3e-17 4.2e-18 0 4.8e-17 1.5e-17 2.5e-18
max 2.5e-13 0 2.3e-13 2.1e-13 1.3e-13 1.4e-13 6.3e-14 3.4e-13 2.7e-13 8.7e-14 0 9.6e-14 1.9e-14 9.1e-14 8.2e-14 1.4e-14 0 9.3e-13 1.5e-13 9.4e-15

Displaying heatmap for key /simulation/plasma/density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/tau_sobolevs in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.9e-12 0 3.4e-12 1.9e-12 1.1e-12 8.6e-13 8.8e-13 1.2e-12 4.3e-13 4.8e-13 0 4.5e-13 2.8e-13 4.8e-13 5.2e-13 1.6e-14 0 1.1e-13 1.6e-13 6.6e-14
max 7.5e-09 0 6e-08 3e-08 3.7e-09 2.8e-09 1.5e-08 1.5e-08 1.4e-09 7.5e-09 0 7.5e-09 7.5e-09 1.1e-08 1.1e-08 5.8e-11 0 1.9e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 5e-16 0 4.1e-16 4.5e-16 3.3e-16 5e-16 3.9e-16 3.9e-16 2.3e-16 3.7e-16 0 6e-16 5.7e-16 6.3e-16 6.7e-16 1.5e-16 0 6.9e-16 3.5e-16 8.6e-17
max 3e-14 0 3.1e-14 2e-14 1.9e-14 1.7e-14 3e-14 2.5e-14 4e-15 2.3e-14 0 1.6e-14 2.3e-14 2.1e-14 3.1e-14 2.4e-15 0 2.4e-14 1.8e-14 3e-15

Displaying heatmap for key /simulation/plasma/number_density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 5.2e-08 0 2.7e-08 2.7e-08 2.6e-08 1.3e-08 1.3e-08 1.4e-08 6.8e-09 5e-09 0 5e-09 1.5e-09 2.4e-09 4.5e-09 7.4e-10 0 1.8e-09 1.1e-09 3.3e-10
max 1.2e-07 0 6e-08 6e-08 6e-08 3e-08 3e-08 3e-08 1.5e-08 1.5e-08 0 1.5e-08 7.5e-09 7.5e-09 1.5e-08 3.7e-09 0 7.5e-09 3.7e-09 1.9e-09
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 1.6e-16 0 1.8e-16 2.1e-16 2.1e-16 1.6e-16 2.1e-16 2.8e-16 1.7e-16 1.8e-16 0 2.7e-16 1.1e-16 1.7e-16 2.5e-16 8.5e-17 0 2.1e-16 1.4e-16 4.2e-17
max 2.2e-16 0 2.8e-16 2.9e-16 3.1e-16 2e-16 2.5e-16 3.5e-16 2.9e-16 2.9e-16 0 4.3e-16 2.1e-16 3.1e-16 4e-16 2.8e-16 0 3.9e-16 2e-16 1.3e-16

Number of keys with same name but different data in ref1 and ref2: 11
Number of totally same keys: 38


Modified file found test_montecarlo_continuum.h5
Path: montecarlo/montecarlo_numba/tests/test_continuum
Total number of keys- in ref1: 144, in ref2: 150
Number of keys with different names in ref1 and ref2: 6
Displaying heatmap for key /simulation/plasma/ion_number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.8e-07 3.8e-08 1.8e-08 6.7e-11 2.2e-09
max 7.6e-06 9.5e-07 4.8e-07 1.9e-09 6e-08
Visualising Relative Differences
  0 1 2 3 4
mean 2.3e-16 4.1e-16 4.1e-16 2.6e-16 2.9e-16
max 4.7e-16 8.2e-16 8.6e-16 7.6e-16 5.2e-16

Displaying heatmap for key /simulation/plasma/cool_rate_ff in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 1.1e-19 5.1e-21 2.1e-22 1.3e-23 2.5e-24
max 1.1e-19 5.1e-21 2.1e-22 1.3e-23 2.5e-24
Visualising Relative Differences
  0 1 2 3 4
mean 4.2e-16 4.9e-16 3.3e-16 2.3e-16 3.8e-16
max 4.2e-16 4.9e-16 3.3e-16 2.3e-16 3.8e-16

Displaying heatmap for key /simulation/plasma/gamma_corr in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 7.8e-12 6.6e-12 3e-12 6.8e-12 2.7e-12
max 1.2e-10 5.8e-11 5.8e-11 5.8e-11 2.9e-11
Visualising Relative Differences
  0 1 2 3 4
mean 2.9e-17 4e-17 4.4e-17 4.4e-17 3.5e-17
max 2.7e-15 6.4e-15 5.7e-15 4.7e-15 4.1e-15

Displaying heatmap for key /simulation/plasma/stimulated_emission_factor in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 3.9e-17 3.9e-17 3.9e-17 4.2e-17 3.9e-17
max 4.4e-16 4.4e-16 4.4e-16 4.4e-16 4.4e-16
Visualising Relative Differences
  0 1 2 3 4
mean 1.5e-13 2.1e-13 1.7e-13 1.8e-13 2.1e-13
max 1.3e-09 1.5e-09 1.4e-09 1.5e-09 1.3e-09

Displaying heatmap for key /simulation/plasma/transition_probabilities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.1e-16 3e-17 5.4e-18 1.4e-18 1.7e-18
max 2.4e-12 3.9e-13 4.9e-14 2e-14 3.3e-14
Visualising Relative Differences
  0 1 2 3 4
mean 0.011 0.0083 1.2e-12 0.00029 1.5e-13
max 2 1.5 1.4e-09 0.33 1.3e-09

Displaying heatmap for key /simulation/plasma/cool_rate_fb_tot in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 1.1e-19 1e-20 8.5e-22 2.6e-23 6.6e-24
max 1.1e-19 1e-20 8.5e-22 2.6e-23 6.6e-24
Visualising Relative Differences
  0 1 2 3 4
mean 1.6e-16 3.6e-16 4.8e-16 1.7e-16 3.8e-16
max 1.6e-16 3.6e-16 4.8e-16 1.7e-16 3.8e-16

Displaying heatmap for key /simulation/plasma/cool_rate_coll_ion in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.7e-19 2.5e-21 4e-23 6.2e-25 2.6e-26
max 5.4e-19 5.1e-21 7.9e-23 1.2e-24 5.2e-26
Visualising Relative Differences
  0 1 2 3 4
mean 6.5e-16 7.6e-16 8.3e-16 5.5e-16 5.6e-16
max 6.7e-16 7.8e-16 8.9e-16 6.4e-16 6.3e-16

Displaying heatmap for key /simulation/transport/transport_state/spectrum/luminosity in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 9.477978e+22
max 3.094850e+26
Visualising Relative Differences
0
mean 4.288796e-16
max 2.954954e-14

Displaying heatmap for key /simulation/plasma/level_number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.9e-09 4.1e-10 1.9e-10 7.1e-13 2.3e-11
max 7.6e-06 9.5e-07 4.8e-07 1.9e-09 6e-08
Visualising Relative Differences
  0 1 2 3 4
mean 3.2e-16 5.1e-16 5.7e-16 5.1e-16 3.3e-16
max 6.5e-16 9.8e-16 1e-15 9.1e-16 6.6e-16

Displaying heatmap for key /simulation/iterations_electron_densities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 7.6e-06 1.9e-06 4.8e-07 1.2e-07 3e-08
max 7.6e-06 1.9e-06 4.8e-07 1.2e-07 3e-08
Visualising Relative Differences
  0 1 2 3 4
mean 1.9e-16 2.3e-16 2.3e-16 2e-16 1.5e-16
max 1.9e-16 2.3e-16 2.3e-16 2e-16 1.5e-16

Displaying heatmap for key /simulation/plasma/fb_emission_cdf in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 1.9e-20 1.5e-20 1.4e-20 1.6e-20 1.5e-20
max 1.1e-16 1.1e-16 1.1e-16 1.1e-16 1.1e-16
Visualising Relative Differences
  0 1 2 3 4
mean 2.3e-20 1.9e-20 1.8e-20 2.1e-20 1.9e-20
max 2.2e-16 2.2e-16 2.1e-16 2.2e-16 2.1e-16

Facing error comparing item:  /simulation/plasma/yg_interp
unsupported operand type(s) for -: 'PchipInterpolator' and 'PchipInterpolator'
Displaying heatmap for key /simulation/transport/transport_state/packet_luminosity in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.548197e+24
max 8.704266e+25
Visualising Relative Differences
0
mean 3.169363e-16
max 8.310808e-15

Displaying heatmap for key /simulation/plasma/non_continuum_trans_probs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  lines_idx transition_type 0 1 2 3 4
mean 0 0 5.5e-18 4.5e-18 3.5e-18 2.3e-18 1.7e-18
max 0 0 6.5e-14 7.7e-15 1.7e-14 1.1e-14 1.1e-14
Visualising Relative Differences
  lines_idx transition_type 0 1 2 3 4
mean 0 0 1.2e-13 1.7e-13 1.4e-13 1.5e-13 1.7e-13
max 0 0 1.3e-09 1.5e-09 1.4e-09 1.5e-09 1.3e-09

Displaying heatmap for key /simulation/plasma/p_deactivation in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.7e-18 9.4e-19 2.4e-19 1.4e-19 1.9e-19
max 4.9e-15 3.1e-15 2.2e-16 5.2e-16 1.1e-15
Visualising Relative Differences
  0 1 2 3 4
mean 1.7e-16 7.8e-17 4.2e-17 2.9e-17 3.5e-17
max 1.8e-13 2.2e-13 1.9e-13 1.2e-13 3.4e-13

Displaying heatmap for key /simulation/plasma/N in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 5.3e-12 1.8e-13 3.7e-15 1.7e-17 2.7e-16
max 3.5e-08 1.4e-09 3.7e-11 3.1e-13 3.5e-12
Visualising Relative Differences
  0 1 2 3 4
mean 1.6e-13 4e-14 4e-15 1.1e-16 1.1e-15
max 3.3e-12 6.9e-13 7.5e-14 1.5e-14 1.8e-13

Displaying heatmap for key /simulation/plasma/ff_cooling_factor in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 110096.0
max 524288.0
Visualising Relative Differences
0
mean 3.229092e-16
max 3.815073e-16

Displaying heatmap for key /simulation/plasma/p_coll_recomb in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 6e-41 1.5e-41 2.7e-42 8.8e-43 1.6e-43
max 1.2e-38 2.9e-39 7.3e-40 1.8e-40 4.6e-41
Visualising Relative Differences
  0 1 2 3 4
mean 1.9e-16 2.3e-16 2.3e-16 2e-16 1.5e-16
max 4.4e-16 5.2e-16 5.9e-16 4.8e-16 4e-16

Displaying heatmap for key /simulation/plasma/p_coll in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 3.9e-21 1e-21 2.7e-22 6.6e-23 1.6e-23
max 2.8e-17 6.9e-18 2.6e-18 6.5e-19 1.1e-19
Visualising Relative Differences
  0 1 2 3 4
mean 1.9e-16 2.4e-16 2.4e-16 2e-16 1.5e-16
max 9.4e-16 1.2e-15 1.2e-15 1e-15 9.3e-16

Displaying heatmap for key /simulation/plasma/chi_bf in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 3.5e-33 1.8e-34 1.3e-35 5.1e-37 1.2e-37
max 8.1e-28 3.8e-29 2.4e-30 9.9e-32 2.5e-32
Visualising Relative Differences
  0 1 2 3 4
mean 3.8e-16 6e-16 5.8e-16 4.6e-16 4e-16
max 1.4e-14 1.3e-14 1.7e-14 9.1e-15 2e-14

Displaying heatmap for key /simulation/plasma/cool_rate_adiabatic in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 7.9e-23 9.9e-24 2.5e-24 0 1e-25
max 7.9e-23 9.9e-24 2.5e-24 0 1e-25
Visualising Relative Differences
  0 1 2 3 4
mean 5.5e-16 3.4e-16 3.4e-16 0 1.4e-16
max 5.5e-16 3.4e-16 3.4e-16 0 1.4e-16

Displaying heatmap for key /simulation/transport/transport_state/spectrum_reabsorbed/luminosity_density_lambda in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 1.542477e+30
max 8.680871e+33
Visualising Relative Differences
0
mean 1.785492e-16
max 5.422534e-14

Displaying heatmap for key /simulation/simulation_state/density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.362520e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.825467e-16
max 2.141522e-16

Displaying heatmap for key /simulation/transport/transport_state/output_nu in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.250867
max 8.750000
Visualising Relative Differences
0
mean 2.615632e-16
max 6.955324e-15

Displaying heatmap for key /simulation/plasma/B in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.3e-16 3.4e-17 5.7e-18 1.4e-18 1.7e-18
max 2.4e-12 3.9e-13 4.9e-14 2e-14 3.3e-14
Visualising Relative Differences
  0 1 2 3 4
mean 0.012 0.0093 1.3e-12 0.00033 1.6e-13
max 2 1.5 3.5e-10 0.33 7e-11

Displaying heatmap for key /simulation/plasma/R in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 4.5e-17 2e-17 8e-18 5.6e-18 1.2e-17
max 7.8e-16 7.8e-16 3.3e-16 3.3e-16 4.1e-15
Visualising Relative Differences
  0 1 2 3 4
mean 0.012 0.0093 1.3e-12 0.00033 1.6e-13
max 2 1.5 3.5e-10 0.33 7e-11

Displaying heatmap for key /simulation/plasma/number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.6e-06 6.6e-07 1.6e-07 4.1e-08 1e-08
max 7.6e-06 1.9e-06 4.8e-07 1.2e-07 3e-08
Visualising Relative Differences
  0 1 2 3 4
mean 1.8e-16 2.2e-16 2.7e-16 1.9e-16 1.7e-16
max 2.2e-16 2.7e-16 3.1e-16 2.3e-16 2e-16

Displaying heatmap for key /simulation/plasma/p_rad_bb in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 5.9e-21 2.1e-21 9.3e-23 2e-23 3.3e-23
max 5.2e-17 2e-17 8.7e-19 4.3e-19 1.7e-18
Visualising Relative Differences
  0 1 2 3 4
mean 1.4e-16 1.3e-16 1.3e-16 1.3e-16 1.3e-16
max 1.8e-13 2.1e-13 1.9e-13 1.6e-13 3.4e-13

Facing error comparing item:  /simulation/plasma/determine_bf_macro_activation_idx
issubclass() arg 1 must be a class
Displaying heatmap for key /simulation/plasma/electron_densities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.000002
max 0.000008
Visualising Relative Differences
0
mean 1.996747e-16
max 2.342458e-16

Displaying heatmap for key /simulation/transport/transport_state/spectrum_reabsorbed/luminosity in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 1.547425e+23
max 6.189700e+26
Visualising Relative Differences
0
mean 1.777162e-16
max 5.417782e-14

Displaying heatmap for key /simulation/plasma/p_photo_ion in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 1.5e-22 1.1e-22 5.3e-23 1.3e-22 5.4e-23
max 3.4e-21 1.7e-21 1.7e-21 8.5e-22 8.5e-22
Visualising Relative Differences
  0 1 2 3 4
mean 2.9e-17 3.8e-17 4.3e-17 4.4e-17 3.5e-17
max 2.7e-15 6.4e-15 5.7e-15 4.7e-15 4.1e-15

Displaying heatmap for key /simulation/plasma/beta_sobolev in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.2e-16 2.1e-16 1.4e-16 3.4e-17 3e-17
max 8.2e-13 6.5e-13 8.1e-13 2.8e-13 3.4e-13
Visualising Relative Differences
  0 1 2 3 4
mean 2.6e-16 2.4e-16 1.5e-16 3.7e-17 3e-17
max 8.2e-13 6.5e-13 8.1e-13 2.8e-13 3.4e-13

Displaying heatmap for key /simulation/plasma/cool_rate_fb in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.5e-22 1.1e-23 8.8e-25 2.8e-26 8.5e-27
max 1.1e-19 5.1e-21 4.2e-22 1.3e-23 3.3e-24
Visualising Relative Differences
  0 1 2 3 4
mean 3.4e-16 4.9e-16 6.3e-16 7.4e-16 2.8e-16
max 6.3e-16 7.6e-16 9.4e-16 1.1e-15 6.9e-16

Displaying heatmap for key /simulation/plasma/density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.362520e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.825467e-16
max 2.141522e-16

Displaying heatmap for key /simulation/plasma/level_absorption_probs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  transition_type lines_idx 0 1 2 3 4
mean 0 0 2.3e-16 3.4e-17 5.7e-18 1.4e-18 1.7e-18
max 0 0 2.4e-12 3.9e-13 4.9e-14 2e-14 3.3e-14
Visualising Relative Differences
  transition_type lines_idx 0 1 2 3 4
mean 0 0 0.012 0.0093 1.3e-12 0.00033 1.6e-13
max 0 0 2 1.5 3.5e-10 0.33 7e-11

Displaying heatmap for key /simulation/plasma/deactivation_channel_probs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  lines_idx transition_type 0 1 2 3 4
mean 0 0 2.6e-18 9.2e-19 2.4e-19 1.4e-19 1.9e-19
max 0 0 4.9e-15 3.1e-15 2.2e-16 5.2e-16 1.1e-15
Visualising Relative Differences
  lines_idx transition_type 0 1 2 3 4
mean 0 0 1.7e-16 7.8e-17 4.5e-17 3.9e-17 3.7e-17
max 0 0 1.8e-13 2.2e-13 1.9e-13 1.2e-13 3.4e-13

Displaying heatmap for key /simulation/plasma/non_markov_transition_probabilities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 3e-18 2.3e-18 1.7e-18 1.3e-18 1.4e-18
max 6.5e-14 7.7e-15 1.7e-14 1.1e-14 2.3e-14
Visualising Relative Differences
  0 1 2 3 4
mean 5.1e-14 7.1e-14 5.7e-14 6.1e-14 7e-14
max 1.3e-09 1.5e-09 1.4e-09 1.5e-09 1.3e-09

Displaying heatmap for key /simulation/transport/transport_state/spectrum/luminosity_density_lambda in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 2.073369e+30
max 1.403543e+34
Visualising Relative Differences
0
mean 4.267222e-16
max 2.971144e-14

Facing error comparing item:  /simulation/plasma/get_current_bound_free_continua
issubclass() arg 1 must be a class
Displaying heatmap for key /simulation/plasma/lte_level_number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 1e-10 4.6e-11 2.9e-12 1.4e-12 3.5e-13
max 2.4e-07 1.2e-07 7.5e-09 3.7e-09 9.3e-10
Visualising Relative Differences
  0 1 2 3 4
mean 3.3e-16 5.1e-16 6.7e-16 5.6e-16 4e-16
max 8.4e-16 1.1e-15 1.1e-15 9.8e-16 7.9e-16

Displaying heatmap for key /simulation/transport/transport_state/last_interaction_in_nu in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.077297
max 8.000000
Visualising Relative Differences
0
mean 2.372121e-16
max 3.745860e-15

Facing error comparing item:  /simulation/plasma/determine_continuum_macro_activation_idx
too many values to unpack (expected 2)
Displaying heatmap for key /simulation/plasma/p_combined in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 1.2e-18 5.2e-19 1.2e-19 7.5e-20 5.2e-19
max 3.9e-15 4.7e-15 4.3e-16 5.6e-16 1.8e-14
Visualising Relative Differences
  0 1 2 3 4
mean 2e-16 1.3e-16 6.5e-17 6.1e-17 7.5e-17
max 1.8e-13 2.1e-13 1.9e-13 1.2e-13 3.2e-13

Displaying heatmap for key /simulation/plasma/p_coll_ion in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 3e-22 8e-23 1.9e-23 4.4e-24 1.2e-24
max 5.4e-20 1.4e-20 1.7e-21 8.5e-22 2.1e-22
Visualising Relative Differences
  0 1 2 3 4
mean 1.9e-16 2.4e-16 2.3e-16 2e-16 1.4e-16
max 3.6e-16 4.4e-16 4.4e-16 3.8e-16 2.7e-16

Displaying heatmap for key /simulation/transport/transport_state/output_energy in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.060703e-19
max 7.589415e-18
Visualising Relative Differences
0
mean 3.156775e-16
max 8.367860e-15

Displaying heatmap for key /simulation/transport/transport_state/nu_bar_estimator in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 6.869749e+14
max 2.533275e+15
Visualising Relative Differences
0
mean 3.405674e-15
max 6.320122e-15

Facing error comparing item:  /simulation/transport/transport_state/scalars
loop of ufunc does not support argument 0 of type numpy.float64 which has no callable fabs method
Displaying heatmap for key /simulation/plasma/tau_sobolevs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.1e-13 1.1e-13 1.8e-14 2.6e-16 1e-15
max 7.5e-09 5.6e-09 9.3e-10 1.5e-11 5.8e-11
Visualising Relative Differences
  0 1 2 3 4
mean 1.5e-13 2.1e-13 1.7e-13 1.8e-13 2.1e-13
max 1.3e-09 1.5e-09 1.4e-09 1.5e-09 1.3e-09

Displaying heatmap for key /simulation/plasma/p_fb_deactivation in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 2.4e-19 3.8e-20 6.9e-20 5.3e-21 1.5e-19
max 1.1e-16 2.8e-17 5.6e-17 3.5e-18 5.6e-17
Visualising Relative Differences
  0 1 2 3 4
mean 1.9e-16 1.4e-16 1.6e-16 5.6e-16 1.1e-16
max 5.5e-16 5.2e-16 4.6e-16 9.6e-16 4.6e-16

Displaying heatmap for key /simulation/transport/transport_state/j_estimator in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.498437
max 2.062500
Visualising Relative Differences
0
mean 2.133455e-15
max 5.014080e-15

Number of keys with same name but different data in ref1 and ref2: 46
Number of totally same keys: 93


Modified file found plasma_unittest_disable_electron_scattering_False.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_disable_electron_scattering_True.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_excitation_dilute-lte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_excitation_lte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_helium_treatment_recomb-nlte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 43, in ref2: 43
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 43


Modified file found plasma_unittest_helium_treatment_recomb-nlte_delta_treatment_0.5.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 43, in ref2: 43
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 43


Modified file found plasma_unittest_initial_t_inner_10000 K.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_initial_t_rad_10000 K.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_ionization_lte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_ionization_nebular.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 41, in ref2: 41
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 41


Modified file found plasma_unittest_line_interaction_type_downbranch.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_line_interaction_type_macroatom.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_line_interaction_type_scatter.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 35, in ref2: 35
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 35


Modified file found plasma_unittest_nlte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 40, in ref2: 40
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 40


Modified file found plasma_unittest_nlte_classical_nebular.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 40, in ref2: 40
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 40


Modified file found plasma_unittest_nlte_coronal_approximation.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 40, in ref2: 40
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 40


Modified file found plasma_unittest_radiative_rates_type_blackbody.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_radiative_rates_type_detailed.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 42, in ref2: 42
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 42


Modified file found plasma_unittest_radiative_rates_type_detailed_w_epsilon_1e-10.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 42, in ref2: 42
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 42


Modified file found plasma_unittest_radiative_rates_type_dilute-blackbody.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found test_collection__density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_levels.h5
Path: plasma/tests/test_hdf_plasma
Total number of keys- in ref1: 1, in ref2: 1
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 1


Modified file found test_hdf_plasma__beta_sobolev__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__electron_densities__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__ion_number_density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__level_number_density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__number_density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__stimulated_emission_factor__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__tau_sobolevs__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__transition_probabilities__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_isotope_number_densities.h5
Path: plasma/tests/test_tardis_model_density_config
Total number of keys- in ref1: 1, in ref2: 1
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 1


In [8]:
data = [
    {
        "file": k,
        "different_keys": v["different_keys"],
        "identical_keys": v["identical_keys"],
        "identical_keys_diff_data": v["identical_keys_diff_data"],
    }
    for k, v in rc.test_table_dict.items()
]

bar_traces = [
    {"y": [d["different_keys"] for d in data], 
     "name": "Different Keys",
     "marker_color": "steelblue"},
    {"y": [d["identical_keys"] for d in data],
     "name": "Identical Keys",
     "marker_color": "#2e7514"}, 
    {"y": [d["identical_keys_diff_data"] for d in data],
     "name": "Identical Keys (Diff Data)",
     "marker_color": "firebrick"}
]

fig = go.Figure()
x_values = [d["file"] for d in data]

for trace in bar_traces:
    fig.add_trace(go.Bar(x=x_values, **trace))

# Customize the layout
fig.update_layout(
    barmode="stack",
    title="File Comparison Metrics",
    xaxis_title="File",
    yaxis_title="Value",
    xaxis_tickangle=-45,
)

fig.update_xaxes(showticklabels=False)
fig.show()
In [ ]: